home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8999 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: C preprocessor problem
  5. Date: 05 Mar 1996 14:20:35 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Mar5072035@qcd.lanl.gov>
  8. References: <313A3ABE.11CD@accent.net>
  9. NNTP-Posting-Host: qcd.lanl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text
  12. In-reply-to: Daniel Bolduc's message of Sun, 03 Mar 1996 16:35:10 -0800
  13.  
  14. In article <313A3ABE.11CD@accent.net>
  15. Daniel Bolduc <eros-ssm@accent.net> writes:
  16.  
  17. <snip>
  18. DB: // preprocess code is:
  19. DB: //
  20. DB: //      zaoFldEmployee [cNameEmployee] . u . cpValue
  21. DB: 
  22. DB: #define S_FVAL(idAlias,idFld) \
  23. DB:    zaoFld##idAlias[##idFld##idAlias].u.cpValue
  24. DB: #define C_FVAL(idAlias,idFld) \
  25. DB:    zaoFld##idAlias[##idFld##idAlias].u.cValue
  26. DB: #define I_FVAL(idAlias,idFld) \
  27. DB:    zaoFld##idAlias[##idFld##idAlias].u.iValue
  28. DB: #define L_FVAL(idAlias,idFld) \
  29. DB:    zaoFld##idAlias[##idFld##idAlias].u.lValue
  30. DB: #define R_FVAL(idAlias,idFld) \
  31. DB:    zaoFld##idAlias[##idFld##idAlias].u.rValue
  32. DB: 
  33.  
  34. I am sorry you did not do your homework and reduce the code to the
  35. smallest possible code that demonstrates your problem: or at least you
  36. did not convince me that you tried to do it. As a result, I snipped
  37. away the entire article without even reading it.
  38.  
  39. What I want to point out is that the above invokes undefined
  40. behaviour. The result of token pasting operator has to be a valid
  41. preprocessing token: neither [cName nor [cNameEmployee is a valid
  42. pp-token. 
  43.  
  44. Why did you put the ## _before_ idFld? I have no idea what you were
  45. thinking of, so I cannot explain what mistake you were making. 
  46.  
  47. Cheers
  48. Tanmoy
  49. --
  50. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  51. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  52. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  53. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  54. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  55. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  56.